package com.stu.utils;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import com.stu.entity.utils.PropertiesBean;

public class ResourceUtils {

	/**
	 * 获取资源文件中对应属性名称的值
	 * @param propFileName 资源文件名
	 * @param key 键
	 * @return
	 */
	public static final String get(String propFileName,String key) {
		return java.util.ResourceBundle.getBundle(propFileName).getString(key);
	}
	
	public static final List<PropertiesBean> getPro(){
		try {
			return FileUtils.getFileContent2("city.txt");
		} catch (IOException e) {
		}
		return new ArrayList<PropertiesBean>();
	}
	
	public static void main(String[] args) {
		JedisUtils<PropertiesBean> jedisUtils=new JedisUtils<PropertiesBean>();
		try {
			List<PropertiesBean>list=FileUtils.getFileContent2("city.txt");
			System.out.println(list.size());
			for(int i=0;i<list.size();i++){
				PropertiesBean model=list.get(i);
				jedisUtils.lpush("citys", model);
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
